<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
	.box1{background:red; height:200px;}
	<!-- absolute需要有(其最近的)已经定位的父元素，那么它的原始位置依旧保持在原来的位置（参照基准）否则以html根元素为参照基准 -->
	.box2{background:green; height:100px;position:absolute;left:50px;top:20px;}
	.box3{background:blue; height:200px;}
	.box{height:60px; background:yellow;position:relative;}
	<!-- 当一个元素设置了绝对定位，没有设置宽度时，元素的宽度根据内容进行调节 --> 
	.wrap{height:400px;width:80%;background:#999;position:absolute;}
</style>
</head>

<body>
   <div class="wrap">
      <div class="box1">box1</div>
         <div class="box">
            <div class="box2">box2</div>
         </div>
      <div class="box3">box3</div>
   </div>
</body>
</html>
